<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">  <!--引入 thymeleaf-->
<head>
    <meta charset="UTF-8">
    <title>导入excel的主页面</title>
</head>
<body>
<h3>选择Excel文件导入到数据库</h3>
<form th:action="@{/user/import}" method="post" enctype="multipart/form-data" class="form-inline">
        <input type="file" name="excelFile">
        <input type="submit"  value="导入数据">
</form>
<h3>显示导入数据列表</h3>
<table  border="1px">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>生日</th>
        <th>爱好</th>
        <th>身份证号</th>
        <th>家庭住址</th>
        <th>照片</th>
    </tr>
    <tr  th:each="user : ${list}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.name}"><img src="" alt=""></td>
        <td th:text="${user.bir}"></td>
        <td th:text="${user.habby}">td>
        <td th:text="${user.num}"></td>
        <td th:text="${user.address}"></td>
        <td ><img th:src="${'/' + user.photo}" th:height="40px" alt="头像信息"></td>
    </tr>
</table>
<br/>
<a th:href="@{/user/export}">导出excel</a>
</body>
</html>